package ink.yql.model;

import java.io.Serializable;

/**
 * @author YQL
 */
public class SolveLock implements Serializable {
    /**
     * 解锁id
     */
    private Integer slid;
    /**
     * 解锁的项目id
     */
    private Integer pid;
    /**
     *  解锁的金额
     */
    private Integer slmoney;
    /**
     *  解锁的承诺
     */
    private String slpromise;

    public SolveLock(Integer slid, Integer pid, Integer slmoney, String slpromise) {
        this.slid = slid;
        this.pid = pid;
        this.slmoney = slmoney;
        this.slpromise = slpromise;
    }

    public SolveLock() {
    }

    public static SolveLockBuilder builder() {
        return new SolveLockBuilder();
    }

    public Integer getSlid() {
        return this.slid;
    }

    public Integer getPid() {
        return this.pid;
    }

    public Integer getSlmoney() {
        return this.slmoney;
    }

    public String getSlpromise() {
        return this.slpromise;
    }

    public void setSlid(Integer slid) {
        this.slid = slid;
    }

    public void setPid(Integer pid) {
        this.pid = pid;
    }

    public void setSlmoney(Integer slmoney) {
        this.slmoney = slmoney;
    }

    public void setSlpromise(String slpromise) {
        this.slpromise = slpromise;
    }

    public boolean equals(final Object o) {
        if (o == this) return true;
        if (!(o instanceof SolveLock)) return false;
        final SolveLock other = (SolveLock) o;
        if (!other.canEqual((Object) this)) return false;
        final Object this$slid = this.getSlid();
        final Object other$slid = other.getSlid();
        if (this$slid == null ? other$slid != null : !this$slid.equals(other$slid)) return false;
        final Object this$pid = this.getPid();
        final Object other$pid = other.getPid();
        if (this$pid == null ? other$pid != null : !this$pid.equals(other$pid)) return false;
        final Object this$slmoney = this.getSlmoney();
        final Object other$slmoney = other.getSlmoney();
        if (this$slmoney == null ? other$slmoney != null : !this$slmoney.equals(other$slmoney)) return false;
        final Object this$slpromise = this.getSlpromise();
        final Object other$slpromise = other.getSlpromise();
        if (this$slpromise == null ? other$slpromise != null : !this$slpromise.equals(other$slpromise)) return false;
        return true;
    }

    protected boolean canEqual(final Object other) {
        return other instanceof SolveLock;
    }

    public int hashCode() {
        final int PRIME = 59;
        int result = 1;
        final Object $slid = this.getSlid();
        result = result * PRIME + ($slid == null ? 43 : $slid.hashCode());
        final Object $pid = this.getPid();
        result = result * PRIME + ($pid == null ? 43 : $pid.hashCode());
        final Object $slmoney = this.getSlmoney();
        result = result * PRIME + ($slmoney == null ? 43 : $slmoney.hashCode());
        final Object $slpromise = this.getSlpromise();
        result = result * PRIME + ($slpromise == null ? 43 : $slpromise.hashCode());
        return result;
    }

    public String toString() {
        return "SolveLock(slid=" + this.getSlid() + ", pid=" + this.getPid() + ", slmoney=" + this.getSlmoney() + ", slpromise=" + this.getSlpromise() + ")";
    }

    public static class SolveLockBuilder {
        private Integer slid;
        private Integer pid;
        private Integer slmoney;
        private String slpromise;

        SolveLockBuilder() {
        }

        public SolveLock.SolveLockBuilder slid(Integer slid) {
            this.slid = slid;
            return this;
        }

        public SolveLock.SolveLockBuilder pid(Integer pid) {
            this.pid = pid;
            return this;
        }

        public SolveLock.SolveLockBuilder slmoney(Integer slmoney) {
            this.slmoney = slmoney;
            return this;
        }

        public SolveLock.SolveLockBuilder slpromise(String slpromise) {
            this.slpromise = slpromise;
            return this;
        }

        public SolveLock build() {
            return new SolveLock(slid, pid, slmoney, slpromise);
        }

        public String toString() {
            return "SolveLock.SolveLockBuilder(slid=" + this.slid + ", pid=" + this.pid + ", slmoney=" + this.slmoney + ", slpromise=" + this.slpromise + ")";
        }
    }
}
